import { reactive, ref } from "vue"

export const trainingplan_query = reactive({
    id: "",
    name: "",
});

export const TrainingPlan = ref({
    lectureName: "",
    teacherId: 0,
    trainningContent: "",
    trainningCost: 0,
});

export const TrainingPlanRules = ref({
    trainningContent: [
        {
            required: true,
            message: '请输入培训计划内容',
            trigger: 'blur'
        },
    ],
    lectureName: [
        {
            required: true,
            message: '请输入课程名',
            trigger: 'blur',
        },
    ],
    teacherId: [
        {
            required: true,
            message: '请输入讲师ID',
            trigger: 'blur'
        },
    ],
    trainningCost: [
        {
            required: true,
            message: '请输入培训费用',
            trigger: 'blur'
        },
    ],
})

export interface TrainingPlanData {
    lectureName: string,
    createTime: string,
    deleted: boolean,
    isGenerateLecture: boolean,
    lectureId: number,
    id: number,
    teacherId: number,
    trainningApplicationId: number,
    trainningContent: string,
    trainningCost: number,
    updateTime: string,
}

interface PageData {
    page: number,
    count: number,
    pagesize: number,
}

export class TrainingPlanListData {
    selectData: PageData = {
        page: 1,
        count: 0,
        pagesize: 5,
    }
    TrainingPlanList: TrainingPlanData[] = []//展示的内容的数据,接受后台返回的数据
}
